<include file="Public/header" />
    <title>借款详情</title>
    <link rel="stylesheet" href="__PUBLIC__/Api/assets/css/reset.css">
    <script src='__PUBLIC__/Api/assets/js/rem.js'></script>
    <link rel="stylesheet" href="__PUBLIC__/Api/assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="__PUBLIC__/Api/assets/css/borrowHistory.css">

</head>

<body>
    <div>
        <div class="com-header">借款详情<i class="fa fa-angle-left back" onclick='location.href="{:U('Index/my')}"'></i></div>
        <?php foreach($arr as $v){?>
            <div class="history-main">
            <div>
                <span>订单号</span>
                <span><?php echo $v['ordersn']?></span>
            </div>
                <div>
                    <span>借款金额(元)</span>
                    <span><?php echo $v['jdje']?>元</span>
                </div>
            <div>
                <span>固定周期</span>
                <span><?php echo $v['ts']?>天</span>
            </div>
            <div>
                <span>手续费</span>
                <span><?php echo $v['sxf']?>元</span>
            </div>
            <div>
                <span>借款状态</span>
                <?php if($v['start']==1){?>
                    <span class="hisActive" style="color: #ffc61a">未缴费</span>
                <?php }else if($v['start']==2){?>
                    <span class="hisActive">已缴费</span>
                <?php }else if($v['start']==3){?>
                    <span class="hisActive" style="color: #ffdf2e">已放款</span>
                <?php }else if($v['start']==4){?>
                    <span class="hisActive" style="color: #ff1fd3">已还款</span>
                <?php }else if($v['start']==5){?>
                    <span class="hisActive" style="color: #ff0849">已取消</span>
                <?php }?>
            </div>
            <div>
                <span>申请时间</span>
                <span class="timerr"><?php echo $v['stime']?></span>
            </div>
            <div>
                <span>放款时间</span>
                <span class="timerr"><?php echo $v['etime']?></span>
            </div>
            <div>
                <span>最后还款时间</span>
                <span class="timerr">
                    <?php
                        if($v['etime']){
                            echo date('Y-m-d H:i:s',strtotime($v['etime'])+($v['ts']*24*60*60));
                        }
                    ?>
                </span>
            </div>
            <div>
                <span>到账银行卡</span>
                <span><?php echo $v['yhkh']?></span>
            </div>
                <div>
                    <span>银行卡手机号</span>
                    <span><?php echo $v['yhkphone']?></span>
                </div>
                <div>
                    <span>银行卡归属</span>
                    <span><?php echo $v['yhkgs']?></span>
                </div>

            <div>
                <span>操作</span>
                <?php if($v['start']==1){?>
                    <span class="hisActive" onclick="edit(<?php echo $v['id']?>,'qjf')" style="color: #ffc61a">去缴费</span>
                <?php }else if($v['start']==2){?>
                    <span class="hisActive">等待放款</span>
                <?php }else if($v['start']==3){?>
                    <span class="hisActive" style="color: #ffdf2e">已放款</span>
                <?php }else if($v['start']==4){?>
                    <span class="hisActive" style="color: #ff1fd3">已还款</span>
                <?php }else if($v['start']==5){?>
                    <span class="hisActive" style="color: #ff0849">已取消</span>
                <?php }?>
            </div>
        </div>
        <?php }?>

    </div>
    <script>
        function goback() {
            history.go(-1); //返回上一页
        }
        function edit(id){
            location.href="/index.php?s=/api/index/jdfk/id/"+id+".html";
        }
    </script>
</body>

</html>
